<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <div>{{name}}</div>
    <button @click='handle'>还有</button>
  </div>
  <script src="../vue.js"></script>
  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        msg: ['帅气', '高大', '聪明', '潇洒'],
        index: 0,
        name: '帅气'
      },
      methods: {
        handle() {
          if (this.index > 2) {
            this.index = -1
          }
          this.index++
          this.name = this.msg[this.index]
        }
      }
    })
  </script>
</body>

</html>